<!--通用css-->
<head th:fragment=header(title)>
    <meta charset="utf-8" />
    <title th:text="${title}"></title>
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}" />
</head>
<!--通用js-->
<div th:fragment="jquery">
    <script type="text/javascript" th:src="@{/js/jquery.min.js}"></script>
    <script type="text/javascript" th:src="@{/js/jquery.serializejson.min.js}"></script>
</div>
<div th:fragment="footer">
    <script type="text/javascript" th:src="@{/layui/layui.js}" ></script>
    <!--ctx-->
    <script th:inline="javascript">var ctx = [[@{/}]];</script>

    <script>
        function saveOrUpdate(url,tid,data,$) {
            $.ajax({
                type:'post',
                url:url,
                data:data,
                dataType:'json',
                success:function(result){
                    layer.alert(result.msg,{
                        btn:['确定'],
                        icon:6,
                        btn1:function(){
                            //先获取当前iframe层的索引
                            var index = parent.layer.getFrameIndex(window.name);
                            parent.layer.close(index);//执行关闭
                            if(result.is){
                                parent.layui.table.reload(tid);//刷新父页面的表格，参数为表格id
                            }
                        }
                    });

                }
            });
        }
    </script>
</div>

<div th:fragment="testLink">
    <script>
        function testLink($,data) {
            $.ajax({
                type:'post',
                url:'/dsc/test',
                data:data,
                dataType:'json',
                success:function(result){
                    layer.msg(result.msg);
                }
            });
        }
    </script>
</div>

<div th:fragment="cronCss">
    <link th:href="@{/js/cron/cron.css}" rel="stylesheet" type="text/css" />
</div>
<div th:fragment="cronJs">
    <script type="text/javascript" th:src="@{/js/cron/jquery-2.1.4.min.js}"></script>
    <script type="text/javascript" th:src="@{/js/cron/jquery.easyui.min.js}"></script>
    <script type="text/javascript" th:src="@{/js/cron/cron.js}"></script>
    <script type="text/javascript" th:src="@{/layui/layui.all.js}"></script>
</div>
